package com.zengdb.jdbc.handler;

import java.sql.ResultSet;
import java.sql.SQLException;

//把结果集中的第一行第一列封装为对象
public class ScalarHandler implements ResultSetHandler<Long> {
	@Override
	public Long handler(ResultSet rs) throws SQLException {
		Long value = 0L;
		if(rs.next()){
			value = rs.getLong(1);
		}
		return value;
	}

}
